<script setup>
import { ref } from 'vue'
import { watch } from 'vue'
const count = ref(0)
const Add = () => {
  count.value++
}
const clickdiv = () => {
  console.log("div")
}
const clickp = () => {
  console.log("p") 
}
watch(count,(newValue, oldValue) => {
    console.log(newValue, oldValue) 
  }
)
</script>
<template>
<p>{{count}}</p>
<button @click.enter="Add">加一</button>
<div @click="clickdiv">
  <a @click.stop="clickp">测试</a>
</div>
</template>